<?php
/**
 * Created by PhpStorm.
 * User: 毛文科
 * Date: 2019/5/22
 * Time: 11:40
 */
namespace app\admin\model;
use think\Model;

class Column extends Model
{
    protected $name = 'column';
    protected $pk = 'id';
    public function __construct($data = [])
    {
        if(session('modular')){
            $this->name = session('modular').'_'.$this->name;
        }else{
            $mokuai = request()->module();
            $this->name = $mokuai.'_'.$this->name;
        }
        parent::__construct($data);
    }
}